﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage.Master" AutoEventWireup="true" CodeBehind="TelaConsultaCliente.aspx.cs" Inherits="GEA_Controle_de_Processos.Modulos.Vendedor.TelaConsultaCliente" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
   <asp:Panel runat="server" ID="pnlPesquisa" SkinID="Pesquisa" DefaultButton="btnPesquisar" GroupingText="Consulta de Cliente">
        <table class="filtros">
            <tr>
                <td class="rotuloFiltro">
                    CPF:
                </td>
                <td>
                    <asp:TextBox runat="server" ID="tbxCpf" ValidationGroup="Pesquisa" SkinID="CpfCnpj"
                        MaxLength="18"></asp:TextBox>
                    <act:MaskedEditExtender ID="tbxCpf_MaskedEditExtender" runat="server" 
                        CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" SkinID="Cpf" 
                        CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                        CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" 
                        TargetControlID="tbxCpf">
                    </act:MaskedEditExtender>
                </td>
                <td class="rotuloFiltro">
                    Nome:
                </td>
                <td>
                    <asp:TextBox runat="server" ID="tbxNome" MaxLength="70"
                        Width="200px"></asp:TextBox>
                </td>
                <td class="rotuloFiltro">
                    Apelido:
                </td>
                <td>
                    <asp:TextBox runat="server" ID="tbxApelido" MaxLength="70"
                        Width="200px"></asp:TextBox>
                </td>
                <td class="rotuloFiltro">
                    Linhas:
                </td>
                <td>
                    <asp:DropDownList runat="server" ID="ddlLinhas" SkinID="Paginacao" 
                        AutoPostBack="True">
                    </asp:DropDownList>
                </td>
                <td align="right">
                    <asp:Button ID="btnPesquisar" runat="server" SkinID="Pesquisar" 
                        onclick="btnPesquisar_Click"/>
                </td>
            </tr>
        </table>
       <asp:GridView ID="gvwClientes" runat="server" AutoGenerateColumns="False" 
            DataSourceID="odsCliente" DataKeyNames="IdCliente" SkinID="SemSelect">
           <Columns>
               <asp:BoundField DataField="IdCliente" HeaderText="IdCliente" 
                   SortExpression="IdCliente" />
               <asp:BoundField DataField="nome" HeaderText="nome" SortExpression="nome" />
               <asp:BoundField DataField="apelido" HeaderText="apelido" 
                   SortExpression="apelido" />
               <asp:BoundField DataField="cpf" HeaderText="cpf" SortExpression="cpf" />
               <asp:BoundField DataField="tipoTelefone" HeaderText="tipoTelefone" 
                   SortExpression="tipoTelefone" />
               <asp:BoundField DataField="telefone" HeaderText="telefone" 
                   SortExpression="telefone" />
               <asp:BoundField DataField="celular" HeaderText="celular" 
                   SortExpression="celular" />
               <asp:BoundField DataField="email" HeaderText="email" SortExpression="email" />
               <asp:CheckBoxField DataField="dependentes" HeaderText="dependentes" 
                   SortExpression="dependentes" />
               <asp:TemplateField HeaderText="Ações">
                    <ItemTemplate>
                        <asp:ImageButton ID="ibnExibir" runat="server" ToolTip="Exibir" SkinID="AcaoExibir"
                            CommandName="Exibir" />
                        <asp:ImageButton ID="ibnAlterar" runat="server" ToolTip="Alterar" SkinID="AcaoAlterar"
                            CommandName="Alterar" />
                    </ItemTemplate>
                    <ItemStyle Width="100px" HorizontalAlign="Center" />
                </asp:TemplateField>      
           </Columns>
       </asp:GridView>
        <asp:ObjectDataSource ID="odsCliente" runat="server" 
            OldValuesParameterFormatString="original_{0}" 
            SelectMethod="ObterNome_Apelido_Cpf" 
            TypeName="GEA_Controle_Processos.Data.Negocio.NegocioCliente">
            <SelectParameters>
                <asp:Parameter Name="nome" Type="String" />
                <asp:Parameter Name="apelido" Type="String" />
                <asp:Parameter Name="cpf" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
   </asp:Panel>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="contentSync" runat="server">
</asp:Content>
